-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Buttons block: remove margin from last button #23319
Buttons block: remove margin from last button #23319
Conversation
Size Change: +295 B (0%) Total Size: 1.12 MB
ℹ️ View Unchanged
|
|
||
.wp-block-button:last-child { | ||
margin-right: 0; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch. Do you think we should remove this margin in all cases, not just the aligned centered buttons? (And the left margin in case of the aligned right ones?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. Done in the last commit: aed2ea7.
Before | After |
---|---|
Fixes #23318.
Description
The Buttons block adds right margin to each block so they are spaced. However, when buttons are centered, last button's margin pushes all buttons to the left. This PR removes the right margin of the last button in the Buttons block when they are centered.
How has this been tested?
It's a pretty small change, the easiest way to test is creating a buttons block, center the buttons and verify the last one doesn't have right margin that pushes everything to the left.
Screenshots
Before:
After: